home *** CD-ROM | disk | FTP | other *** search
-
-
- x
-
- x
-
- åWhat Does Menu Events Do?
-
-
-
- Menu Events is a system extension. Once you have placed it in your
-
- Extensions folder and restarted your Macintosh, it adds a small suite of
-
- Apple events (“Menu events”) to the set supported by every
-
- high-level-event-aware application.
-
-
-
- Many people are justly wary of control panels and system extensions,
-
- because of the conflicts they often cause with System software and with
-
- each other. These conflicts usually result from competitive trap patching.
-
-
- Menu Events does not patch any traps at system startup. It works by
-
- installing Apple event handlers in the system dispatch table. These
-
- handlers are not in conflict with any others, because they are bound
-
- specifically to the Menu event class. Menu Events does patch some traps
-
- “on the fly” to simulate menu selection, but the patches remove
-
- themselves immediately.
-
-
- There are three events defined in the suite, and they work as follows.
-
- See the section entitled “Menu Events Suite” for more information on the
-
- Menu Events suite.
-
-
-
-
- xQuery Menu List Event
-
-
- This event, with no parameters, queries the menu list of the target
-
- application. If the application is not background-only and has a menu bar,
-
- it will return a list of records, each containing a menu ID (integer), a title
-
- (string), and an enable/disable (Boolean) parameter. If you do not know
-
- the IDs of the target application’s menus, this is how to find out. Be
-
- aware that menu IDs do not have to agree with 'MENU' resource IDs,
-
- though they often do.
-
-
-
- System menus (Keyboard, Help, Application) and pop-up menus do not
-
- appear in this list, but the Apple menu and hierarchical menus do.
-
-
-
-
- xQuery Menu Event
-
-
- This event, given a menu ID (integer) parameter, queries the items of a
-
- certain target application menu. If the application has a menu with that
-
- ID, be it a regular, system, hierarchical, or pop-up menu, it will return a
-
- list of records, each containing a menu item ID (integer), an item title
-
- (string), an enable/disable (Boolean), a mark character (integer), an icon
-
- ID (integer), a style value (integer), and a Command character (integer)
-
- parameter. The items are numbered starting from 1 at the top end of the
-
- menu. Separators appear as disabled items with an item title of “-”.
-
-
-
- This event does not work for menus which use a non-standard menu
-
- definition function ('MDEF').
-
-
-
-
- xSelect Menu Item Event
-
-
- This event, given a menu ID (integer) and a menu item ID (integer)
-
- parameter, asks the application to act as though the user pulled down that
-
- menu and selected that item. This does not work for the Keyboard and
-
- Application menus, which are not under the control of the application, nor
-
- for the upper (System-defined) part of the Help menu, but it works for
-
- any regular, application-defined, enabled menu item.
-
-
-
- This event does not work for menus which use a non-standard menu
-
- definition function ('MDEF').
-
-
- This event brings the target application to the front before forcing the
-
- menu selection upon it. If the sender was on the same machine, and was
-
- previously in front, it returns to the front after the menu action is
-
- complete.
-
- See the section entitled “How Does Menu Events Work?” for more
-
- information about the method by which Menu Events activates the target
-
- application.
-
-
-
-